<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>首页</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!--mui-->
    <link rel="stylesheet" href="lib/mui.css"/>
    <script src="lib/mui.js"></script>

    <!--引入初始化样式-->
    <link rel="stylesheet" href="css/reset.css"/>

    <!--引入公共样式-->
    <link rel="stylesheet" href="css/global.css"/>

    <script src="js/jquery-1.12.2.min.js"></script>
    <script src="js/global.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<div class="message-bgc in-top">
    <div class="infor">
        <div class="nickname">
            <img id="pic" class="head-portrait" src="./images/people.png" alt="">
            <input id="upload" name="file" accept="image/*" type="file" style="display: none"/>
            <span class="nickname-1">FONY</span>
            <span class="change-n">修改昵称</span>
        </div>
        <div class="payfor">
            <span class="fl">电话号码</span>
            <span class="fr">150****5523</span>
        </div>
        <div class="payfor">
            <span class="fl">收款类型</span>
            <select class="choose">
                <option> 支付宝 </option>
                <option> 微信 </option>
            </select>
            <img class="jt" src="./images/user-icon.png" alt="">
        </div>
        <div class="payfor">
            <span class="fl">点击上传二维码</span>
        </div>
        <div class="up-photo">
            <img id="pic1" class="up-add" src="./images/add.png" alt="">
            <input id="upload1" name="file" accept="image/*" type="file" style="display: none"/>
        </div>
        <p class="record">收款类型可选择支付宝或者微信,请上传相应的收款二维码</p>
        <ul class="address">
            <li>
                <span>收货地址</span>
                <img src="./images/right-r.jpg" alt="">
            </li>
        </ul>
        <div class="infor-qr">
            <img src="./images/ti-xian-zi-liao-que-ding.png" alt="">
        </div>
    </div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery-1.12.2.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>

</body>
<script>
    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                if(clientWidth>=750){
                    docEl.style.fontSize = '100px';
                }else{
                    docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
                }
            };

        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
    $(function() {
        $("#pic").click(function () {
            $("#upload").click();
            $("#upload").on("change",function(){
                var objUrl = getObjectURL(this.files[0]) ;
                if (objUrl) {
                    $("#pic").attr("src", objUrl) ;
                }
            });
        });
    });

    $(function() {
        $("#pic1").click(function () {
            $("#upload1").click();
            $("#upload1").on("change",function(){
                var objUrl = getObjectURL(this.files[0]) ;
                if (objUrl) {
                    $("#pic1").attr("src", objUrl) ;
                }
            });
        });
    });


    //建立一個可存取到該file的url
    function getObjectURL(file) {
        var url = null ;
        if (window.createObjectURL!=undefined) {
            url = window.createObjectURL(file) ;
        } else if (window.URL!=undefined) {
            url = window.URL.createObjectURL(file) ;
        } else if (window.webkitURL!=undefined) {
            url = window.webkitURL.createObjectURL(file) ;
        }
        return url ;
    }
</script>
</html>